/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.ove.openmath.jome.model;

/**
 *
 * @author Mr.Sam
 */
import java.util.*;
import fr.ove.openmath.jome.model.*;
import fr.ove.openmath.jome.model.evaluation.*;

/**
* The same as @see BinaryOperator but the difference is the name of the operator is made of letters. And if the
* operator is glued to its operands during parsing, the name of the operator could not be detected. So space before
* and after the name of the operator are necessary.<BR>
* So, the only difference with @see BinaryOperator is the spaces added around the name of the operator when exporting
* the linear form.
*
* @author © 2000 DIRAT Laurent
* @version 2.0 12/01/2000
*/
public class NamedBinaryOperator extends BinaryOperator {
    /**
    * The Creation of the corresponding linear expression of the formula.
    */
    public String createLinear(String linear) {
        linear = ((FormulaTreeStructure) getChild(0)).createLinear(linear);
        linear += " " + getTheOperator() + " ";
        linear = ((FormulaTreeStructure) getChild(1)).createLinear(linear);
        return linear;
    }
}
